package com.cxh.service.impl;

import com.cxh.base.Data1ServiceImpl;
import com.cxh.base.Data2ServiceImpl;
import com.cxh.util.DataSource;
import com.cxh.dao.RobotInfoDao;
import com.cxh.entity.RobotInfo;
import com.cxh.service.RobotInfoService;
import com.cxh.util.CommonUtility;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 类说明：
 * @author  ChenXH
 * @date  2019-01-04 15:22:57
 */
@Service("robotInfoService")
@DataSource("dataSource1")
public class RobotInfoServiceImpl extends Data1ServiceImpl<RobotInfo> implements RobotInfoService {
    @Autowired
    private RobotInfoDao dao;


    @Override
    public List<RobotInfo> loadPageList(Map<String, Object> map) {
       return dao.loadPageList(map);
    }

    @Override
    public RobotInfo loadByCode(String code) {
    	if(CommonUtility.isEmpty(code)){
			return null;
		}
		return dao.loadByCode(code);
    }
}
